import json
import requests
import AudioConfig

def reply(s=''):
	form_data={
	    "perception": {
	        "inputText": {
	            "text": s
	        }
	    },
	    "userInfo": {
	        "apiKey": AudioConfig.TULING_API_KEY,
	        "userId": "0"
	    }
	}
	body = requests.post('http://openapi.tuling123.com/openapi/api/v2',data=json.dumps(form_data)).text
	body = json.loads(body)
	body = body['results']
	body = body[-1]['values']['text']
	return body


